package com.billdowney.entity.text.chinese;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.billdowney.entity.base.BaseEntityIdByUUIDHex;

import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 中文拼音表
 * @author: 唐路钧
 * @date: 2018年12月25日 上午11:25:26
 */
@Entity
@Table(name = "text_chinese_pinyin")
public class TextChinesePinyin extends BaseEntityIdByUUIDHex {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "拼音")
	@Column(length = 10)
	private String pinyin;
	@ApiModelProperty(value = "拼音带音标")
	@Column(length = 10)
	private String pinyinTone;
	@ApiModelProperty(value = "拼音带数字音标")
	@Column(length = 10)
	private String pinyinToneNum;
	@ApiModelProperty(value = "音标", notes = "数字音标：1:一声；2:二声；3:三声；4:四声；5:轻声")
	@Column(length = 1)
	private int tone;
	@ApiModelProperty(value = "首字母")
	@Column(length = 1)
	private String firstLetter;
	@ApiModelProperty(value = "声母")
	@Column(length = 10)
	private String initials;
	@ApiModelProperty(value = "韵母")
	@Column(length = 10)
	private String finals;
	@ApiModelProperty(value = "解释")
	@Column(length = 200)
	private String meaning;

	@ManyToOne(targetEntity = TextChinese.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "textChinese_id")
	@ApiModelProperty(value = "文字信息")
	private TextChinese textChinese;

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

	public String getPinyinTone() {
		return pinyinTone;
	}

	public void setPinyinTone(String pinyinTone) {
		this.pinyinTone = pinyinTone;
	}

	public String getPinyinToneNum() {
		return pinyinToneNum;
	}

	public void setPinyinToneNum(String pinyinToneNum) {
		this.pinyinToneNum = pinyinToneNum;
	}

	public int getTone() {
		return tone;
	}

	public void setTone(int tone) {
		this.tone = tone;
	}

	public String getFirstLetter() {
		return firstLetter;
	}

	public void setFirstLetter(String firstLetter) {
		this.firstLetter = firstLetter;
	}

	public String getInitials() {
		return initials;
	}

	public void setInitials(String initials) {
		this.initials = initials;
	}

	public String getFinals() {
		return finals;
	}

	public void setFinals(String finals) {
		this.finals = finals;
	}

	public String getMeaning() {
		return meaning;
	}

	public void setMeaning(String meaning) {
		this.meaning = meaning;
	}

	public TextChinese getTextChinese() {
		return textChinese;
	}

	public void setTextChinese(TextChinese textChinese) {
		this.textChinese = textChinese;
	}

	@Override
	public String toString() {
		return "TextChinesePinyin [pinyin=" + pinyin + ", pinyinTone=" + pinyinTone + ", pinyinToneNum=" + pinyinToneNum
				+ ", tone=" + tone + ", firstLetter=" + firstLetter + ", initials=" + initials + ", finals=" + finals
				+ ", meaning=" + meaning + "]";
	}

}
